#include<iostream>
using namespace std;
class Complex
{
	private:
		double real;
		double imaginary;
	public:
		Complex(double r = 0.0, double i = 0.0) :real(r), imaginary(i) {}
		Complex operator+(int n){
			return Complex(real + n,imaginary);
		}
		friend Complex operator+(int r,const Complex & C){
			return Complex(C.real + r,C.imaginary);
		}
		void display()const{
			cout<<real<<","<<imaginary<<endl;
		}
};
int main()
{
	Complex a(5);
	Complex b;
	b = a + 5;
	b.display();
	b = 5 + a;
	b.display();
	return 0;
}